import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../components/Layout/index'),
    redirect: '/discovery',
    children: [
      {
        path: '/discovery',
        name: 'discovery',
        meta: {
          title: '首页',
          keepAlive: true,
        },
        component: () =>
          import(
            /* webpackChunkName: "discovery" */ '../views/Discovery/RecommendDaily/index'
          ),
      },
      {
        path: '/playlist/:id',
        name: 'playlist',
        meta: {
          title: '音乐列表',
          keepAlive: true,
        },
        component: () =>
          import(
            /* webpackChunkName: "playlist" */ '../views/SonglistDetail/index'
          ),
      },
    ],
  },
  // {
  //   path: '/about',
  //   name: 'About',
  //   meta: {
  //     title: '关于',
  //     keepAlive: true,
  //   },
  //   component: () => import('../views/About.vue'),
  // },
]
export const router = createRouter({
  history: createWebHashHistory(),
  routes,
})
